package com.weight.common.exception;

import com.weight.common.enums.ResultEnum;

public class CSException extends RuntimeException{
	private static final long serialVersionUID = 1L;
	private String code;

	public CSException(String message){
        super(message);
    }
	public CSException(String message, Throwable cause){ 
		super(message, cause);
	}
	public CSException(ResultEnum resultEnum){
       super(resultEnum.getMessage());
       this.code = resultEnum.getCode();
	}
	public CSException(ResultEnum resultEnum,String message){
		super(message);
       this.code = resultEnum.getCode();
	}

    public CSException(String code,String message){
        super(message);
        this.code = code;
    }

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}
	
	

}
